package com.sxhalo.fsms.mapper;

import com.sxhalo.fsms.domain.FactDevice;
import org.apache.ibatis.annotations.Param;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

public interface FactDeviceMapper {
    int deleteByPrimaryKey(Integer deviceId);

    int insert(FactDevice record);

    int insertSelective(FactDevice record);

    FactDevice selectByPrimaryKey(Integer deviceId);

    int updateByPrimaryKeySelective(FactDevice record);

    int updateByPrimaryKey(FactDevice record);
    
    int getCount(@Param("where")String where);

    List<FactDevice> findWhereList(@Param("where")String where, @Param("order")String order);

    List<FactDevice> findPagerList(@Param("start")Integer start, @Param("length")Integer length, @Param("where")String where, @Param("order")String order);
    int getChildCount(@Param("where")String where, @Param("parentId")Integer parentId);
    List<FactDevice> findChildPagerList(@Param("start")Integer start, @Param("length")Integer length, @Param("where")String where, @Param("order")String order, @Param("parentId")Integer parentId);


    int batchInsert(@Param("record")FactDevice record,@Param("num")Integer num,@Param("devicename")String devicename);
    int batchInsert1(@Param("list")List<FactDevice> list);

    int batchUpdate(@Param("record")FactDevice record,@Param("where")String where);

    Map<String,Object> getStatistics(@Param("where")String where);

    List<FactDevice> getTypeList(@Param("where")String where);

    int deleteByWhere(@Param("where")String where);

    List<FactDevice> findRealDataPagerList(@Param("start")Integer start, @Param("length")Integer length, @Param("where")String where, @Param("order")String order, @Param("parentId")Integer parentId);
    int getRealDataCount(@Param("where")String where, @Param("parentId")Integer parentId);


    List<HashMap> findAttrHis(@Param("attr")String  attr, @Param("where")String   where,@Param("tableName")String  tableName);
}